#include <stdio.h>

#define IS_SET(flag, bit)		((flag) & (bit))
#define SET_BIT(var, bit)		((var) |= (bit))
#define REMOVE_BIT(var, bit)	((var) &= ~(bit))

int f(int a)
{
	int rt = a;

	SET_BIT(rt, 0x4000);
	REMOVE_BIT(rt, 0x200);

	return rt;
}

int main()
{
	f(0x12340678);

	return 0;
}

#if 0
/*
 * intel
 */
0000000000001129 <f>:
    1129:	f3 0f 1e fa          	endbr64 
    112d:	55                   	push   %rbp
    112e:	48 89 e5             	mov    %rsp,%rbp
    1131:	89 7d ec             	mov    %edi,-0x14(%rbp)		// (rbp-0x14)=param
    1134:	8b 45 ec             	mov    -0x14(%rbp),%eax		// eax=param
    1137:	89 45 fc             	mov    %eax,-0x4(%rbp)		// (rbp-0x4)=param
    113a:	81 65 fc ff fd ff ff 	andl   $0xfffffdff,-0x4(%rbp)	// (rbp-0x4)=param&0xfffffdff
    1141:	8b 45 fc             	mov    -0x4(%rbp),%eax		// eax=param
    1144:	5d                   	pop    %rbp
    1145:	c3                   	retq   

0000000000001146 <main>:
    1146:	f3 0f 1e fa          	endbr64 
    114a:	55                   	push   %rbp
    114b:	48 89 e5             	mov    %rsp,%rbp
    114e:	bf 78 06 34 12       	mov    $0x12340678,%edi
    1153:	e8 d1 ff ff ff       	callq  1129 <f>
    1158:	b8 00 00 00 00       	mov    $0x0,%eax
    115d:	5d                   	pop    %rbp
    115e:	c3                   	retq   
    115f:	90                   	nop

/*
 * arm
 */
000000000040051c <f>:
  40051c:	d10083ff 	sub	sp, sp, #0x20
  400520:	b9000fe0 	str	w0, [sp, #12]
  400524:	b9400fe0 	ldr	w0, [sp, #12]
  400528:	b9001fe0 	str	w0, [sp, #28]
  40052c:	b9401fe0 	ldr	w0, [sp, #28]
  400530:	12167800 	and	w0, w0, #0xfffffdff
  400534:	b9001fe0 	str	w0, [sp, #28]
  400538:	b9401fe0 	ldr	w0, [sp, #28]
  40053c:	910083ff 	add	sp, sp, #0x20
  400540:	d65f03c0 	ret

0000000000400544 <main>:
  400544:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  400548:	910003fd 	mov	x29, sp
  40054c:	5280cf00 	mov	w0, #0x678                 	// #1656
  400550:	72a24680 	movk	w0, #0x1234, lsl #16
  400554:	97fffff2 	bl	40051c <f>
  400558:	52800000 	mov	w0, #0x0                   	// #0
  40055c:	a8c17bfd 	ldp	x29, x30, [sp], #16
  400560:	d65f03c0 	ret
  400564:	00000000 	.inst	0x00000000 ; undefined


#endif

